<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    function Human(name,age){
       this.name = name
       this.age = age
    
    }

    function Man(name,age,address){
        //借用父类构造方法 (2选1) 
        // 缺点 : 无法使用通过原型对象（prototype）添加的属性和方法
        Human.call(this,name,age);
        // Human.apply(this,[name,age]);
        this.address =address
        this.show = function(){
           alert("我的名字是："+this.name+",年龄是："+this.age+",地址是："+this.address)
       }
    }
   let s = new Man("张三",20,"重庆")
   s.show()
    </script>
</body>
</html>